package basic.chapter12;

/**
 * @author Kevin
 * @date 2020/2/23 11:14
 */
public class Counter {
    private long value;
    synchronized long get() {
        return value;
    }
    synchronized long addOne() {
        return ++value;
    }
}
